//#version 130
//
//uniform int numbOfPL; // not supposed to be here
//
//
//in vec4 vVertex;
//in vec4 vColor;
//in vec4 vNormal;
//in vec2 vTexCoord;
//
//out vec4 fColor;
//out vec3 fNormal;
//out vec2 fTexCoord;
//out vec3 fVertPos;
//
//
//void main()
//{
	//fVertPos = (gl_ModelViewMatrix * vVertex).xyz;
	//fNormal = normalize(gl_NormalMatrix * vNormal.xyz);
	//
	//gl_Position = gl_ModelViewProjectionMatrix * vVertex;
	//fTexCoord = vTexCoord;
	//fColor = vColor;
//}

#version 130

in vec4 vVertex;
in vec4 vColor;
in vec4 vNormal;
in vec2 vTexCoord;

out vec4 fColor;
out vec3 fNormal;
out vec2 fTexCoord;
out vec3 fVertPos;

void main()
{
	fVertPos = (gl_ModelViewMatrix * vVertex).xyz;
	fNormal = normalize(gl_NormalMatrix * vNormal.xyz);
	
	
	gl_Position = gl_ModelViewProjectionMatrix * vVertex;
	fTexCoord = vTexCoord;
	fColor = vColor;
}